/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.dao;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.sigmatrix.h5.entity.DisRebateScanCode;
import com.sigmatrix.h5.web.args.DealerInventoryPageParam;
import com.sigmatrix.h5.web.mode.DealerInventoryData;
import com.sigmatrix.h5.web.mode.DealerInventoryDayCount;
import com.sigmatrix.sc.jdbc.common.dao.Dao;
import com.sigmatrix.sc.jdbc.common.lang.Page;

/**
 *@ClassName: DisRebateScanCodeDao
 *@Description:
 *@author MH
 *@date 2017年8月14日 下午6:26:47
 */
public interface DisRebateScanCodeDao extends Dao<DisRebateScanCode,Integer>{
	/**
	 * 
	 *@Title: selectCountByDealerAcctsIdAndActivityId
	 *@Description: 该查询通过经销商的某一个账号查询该经销商下所有账号扫码的次数
	 *@return Integer
	 *@author MH
	 *@date 2017年8月29日 下午4:42:32
	 *@param acct
	 *@param activityId
	 *@return
	 *@throws DaoException
	 */
	Integer selectCountByDealerAcctsIdAndActivityId(String acct, Integer activityId);
	/**
	 * 查询经销商扫码的次数
	 *@Title: selectCountByDealerIdAndActivityId
	 *@Description: 
	 *@return Integer
	 *@author MH
	 *@date 2017年8月30日 上午11:41:23
	 *@param dealerId
	 *@param activityId
	 *@return
	 *@throws DaoException
	 */
	Integer selectCountByDealerIdAndActivityId(Integer dealerId, Integer activityId);
	/**
	 * 
	 * @param po
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	Page<DealerInventoryData> findPage(DealerInventoryPageParam vo);
	
	/**
	 * 
	 *@Title: countByOpenIdInHoure
	 *@Description:查询openId在一段时间内的扫码次数
	 *@return Integer
	 *@author MH
	 *@date 2018年1月29日 下午4:20:59
	 *@param openId
	 *@param activityId
	 *@param firstScanTime
	 *@param period
	 *@return
	 */
	Integer countByOpenIdInHoure(String openId, Integer activityId, Date firstScanTime, int period);
	/**
	 * 
	 *@Title: findScanHistory2_6
	 *@Description:
	 *@return List<DisRebateScanCode>
	 *@author MH
	 *@date 2018年2月2日 上午12:30:09
	 *@param qrCode
	 *@param qrCode2
	 *@return
	 */
	List<DisRebateScanCode> findScanHistory2_6(String qrCode, String qrCode2);
	
	List<DealerInventoryDayCount> findDayCount(DealerInventoryPageParam vo);
	/**
	 * 查询当前条件的返利总金额
	 * @param vo
	 * @return
	 */
	BigDecimal findPriceTotal(DealerInventoryPageParam vo);
}
